package com.cimu.ehcache.controller;

import com.cimu.ehcache.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Title: EhcacheController
 * Copyright: Copyright (c) 2017
 *
 * date 2018年12月19日 18:17
 */
@RestController
public class EhcacheController {
    @Autowired
    private UserService userService;

    @GetMapping("/get")
    public Object getById(Long id){
        return userService.getByAll();
    }

    @GetMapping("/update")
    public Object update(){
        userService.update();
        return "success";
    }

}
